//package com.gzcstec.product.rabbitmq;
//
//import com.gzcstec.product.dataobject.DecreaseStockInput;
//import com.gzcstec.product.rabbitmq.client.MySource;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.stream.annotation.EnableBinding;
//import org.springframework.messaging.support.MessageBuilder;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/mq/stream")
//@EnableBinding(value = {MySource.class})
//public class MqStreamController {
//
//    @Autowired
//    private MySource mySource;
//
//    @GetMapping("/send")
//    public String send() {
//        DecreaseStockInput decreaseStockInput = new DecreaseStockInput("001" , 1);
//        mySource.output().send(MessageBuilder.withPayload(decreaseStockInput).build());
//        return "stream send ok";
//    }
//}
